<template>
	<view>
		<u-tabs :list="tabList" :is-scroll="false" :current="currentSort" @change="changeSort"></u-tabs>
		<u-row gutter="16" class="u-skeleton">
			<u-col span="6" v-for="goods in goodsList" :key="goods.id">
				<goods-card :goods="goods"></goods-card>
			</u-col>
		</u-row>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				currentSort: 0,
				tabList: [{
					name: '最新'
				}, {
					name: '手机'
				}, {
					name: '图书',
				}, {
					name: '衣服',
				}, {
					name: '电脑',
				}, ],
				goodsList: [{
					image:"https://s.300sj.com/d/file/202111/27/smallf8595a49dc320501d6019f84c02b66b91638015777.jpg?attach=0&image_process=resize,fw_210,fh_139"
				}, 
				{
					image:"https://s.300sj.com/d/file/202111/27/smallf8595a49dc320501d6019f84c02b66b91638015777.jpg?attach=0&image_process=resize,fw_210,fh_139"
					},
				{
					image:"https://s.300sj.com/d/file/202111/27/smallf8595a49dc320501d6019f84c02b66b91638015777.jpg?attach=0&image_process=resize,fw_210,fh_139"
					}, 
				{
					image:"https://s.300sj.com/d/file/202111/27/smallf8595a49dc320501d6019f84c02b66b91638015777.jpg?attach=0&image_process=resize,fw_210,fh_139"
					}],
				
			}
		},
		methods: {
			changeSort(index) {
				console.log(index)
				this.currentSort = index;
				// this.getData()
			},
			toMaiIndex() {
				uni.navigateTo({
					url: '/pages/index/jimai/jimai'
				});
			}
		}
	}
</script>

<style>

</style>
